// Name: Devin Murnan // Class: Special Topics // Hour: 5th // 3rd Image // Title: Blob Image Three; Pile O' Swag // This basically just takes a blob counter, and makes 60 blobs. // The blob counter provides values for translation, color, and scale of the blobs. // Blobs change color and get bigger the farther from the center they go. // // V3 "Pile O' Swag" Now the blobs will rotate. It's fun for the whole family. #declare RadiusVal = 1.0; // (0 < RadiusVal) outer sphere of influence on other components #declare StrengthVal = 1.0; // (+ or -) strength of component's radiating density // perspective (default) camera camera { location <2.0, 5.0, -20.0> look_at <1.5, 0.0, 0.0> right x*image_width/image_height rotate <0, 0, 0> } // An area light (creates soft shadows) light_source { 0*x // light's position (translated below) color rgb 1.0 // light's color area_light <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z) 4, 4 // total number of lights in grid (4x*4z = 16 lights) adaptive 0 // 0,1,2,3... jitter // adds random softening of light circular // make the shape of the light circular orient // orient light translate <40, 80, -40> // position of light rotate<20,0,0> } #declare blobcounter = -10; // This will be our variable for multiple things. #declare Rnd_1 = seed (12); #while(blobcounter<50) // As you can see, fifty blobs should be created when this finishes. // View all of the blobs by going back on the camera's Z axis. blob { // threshold (0.0 < threshold <= StrengthVal) surface falloff threshold # threshold 0.6 sphere { < 0.75, 0, 0>, RadiusVal, StrengthVal } sphere { <-0.375, 0.65, 0>, RadiusVal, StrengthVal } sphere { <-0.375, -0.65, 0>, RadiusVal, StrengthVal } cylinder { -z, +z, RadiusVal, StrengthVal } scale blobcounter pigment{color rgb<1,1,10*rand(Rnd_1)>} translate finish { // (---surface finish---) ambient 0.0 specular 0.6 // shiny reflection 0.3 } rotate clock*x*360 // This is all you need to animate the thing. } #declare blobcounter = blobcounter + 1; #end